package metalink;

import java.util.ArrayList;

import model.admin.GetBatchListMo;
import model.admin.GetCourseListMo;
import model.admin.HostelMo;
import model.admin.LibraryMo;
import model.admin.PopulateStaffListMo;
import model.admin.PopulateStudentsListMo;

import com.opensymphony.xwork2.ActionSupport;

import vo.BatchDetailsVo;
import vo.CollegeResidentialVo;
import vo.CollegeStaffVo;
import vo.LibraryBookDetailsVo;
import vo.StudentDetailsVo;
import vo.mixed.CourseListVo;
import vo.mixed.DegreeListVo;
import vo.mixed.DepartmentListVo;

public class GetAllCount {
	private int hostelcount;
	ArrayList<CollegeResidentialVo> hostelList;
	ArrayList<StudentDetailsVo> list; 
	ArrayList<CollegeStaffVo> staff_list=new ArrayList<CollegeStaffVo>();
	ArrayList<BatchDetailsVo> batch_list;
	ArrayList<CourseListVo> course_list;
	ArrayList<DegreeListVo> degree_list;
	ArrayList<DepartmentListVo> department_list;
	ArrayList<LibraryBookDetailsVo> allBooks;
	public int getHostelcount() {
		hostelList=new ArrayList<CollegeResidentialVo>();
		HostelMo mo = new HostelMo();
		try {
			hostelList=mo.hostelList();
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return hostelList.size();
	}
	
	public int getStudentCount(){
		PopulateStudentsListMo populate=new PopulateStudentsListMo();
		try {
			list=populate.populatelist();
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return list.size();
	}
	
	public int getStaffCount(){
		staff_list=new PopulateStaffListMo().retrievestaff();
		return staff_list.size();
	}
	
	public int getBatchCount(){
		GetBatchListMo BatchListObject= new GetBatchListMo();
		try {
			batch_list = BatchListObject.getBatchList();
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return batch_list.size();
	}
	
	public int getCourseCount(){
		GetCourseListMo course_list_object = new GetCourseListMo();
		course_list = course_list_object.getCourseList(0);
		return course_list.size();
	}
	
	public int getDegreeCount(){
		GetBatchListMo degree_list_object = new GetBatchListMo();
		degree_list = degree_list_object.getBatchDegreeList(0);
		return degree_list.size();
	}
	
	public int getDepartmentCount(){
		GetBatchListMo department_obj = new GetBatchListMo();
		try {
			department_list = department_obj.getDepartmentList(0, 0, 0);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return department_list.size();
	}
	
	public int getLibraryBooksCount(){
		LibraryMo mo = new LibraryMo();
		allBooks = new ArrayList<LibraryBookDetailsVo>();
		allBooks = mo.allBooks();
		return allBooks.size();
	}
	public void setHostelcount(int hostelcount) {
		this.hostelcount = hostelcount;
	}
	public ArrayList<CollegeResidentialVo> getHostelList() {
		return hostelList;
	}
	public void setHostelList(ArrayList<CollegeResidentialVo> hostelList) {
		this.hostelList = hostelList;
	}

	public ArrayList<StudentDetailsVo> getList() {
		return list;
	}

	public void setList(ArrayList<StudentDetailsVo> list) {
		this.list = list;
	}

	public ArrayList<CollegeStaffVo> getStaff_list() {
		return staff_list;
	}

	public void setStaff_list(ArrayList<CollegeStaffVo> staff_list) {
		this.staff_list = staff_list;
	}

	public ArrayList<BatchDetailsVo> getBatch_list() {
		return batch_list;
	}

	public void setBatch_list(ArrayList<BatchDetailsVo> batch_list) {
		this.batch_list = batch_list;
	}

	public ArrayList<CourseListVo> getCourse_list() {
		return course_list;
	}

	public void setCourse_list(ArrayList<CourseListVo> course_list) {
		this.course_list = course_list;
	}

	public ArrayList<DegreeListVo> getDegree_list() {
		return degree_list;
	}

	public void setDegree_list(ArrayList<DegreeListVo> degree_list) {
		this.degree_list = degree_list;
	}

	public ArrayList<DepartmentListVo> getDepartment_list() {
		return department_list;
	}

	public void setDepartment_list(ArrayList<DepartmentListVo> department_list) {
		this.department_list = department_list;
	}

	public ArrayList<LibraryBookDetailsVo> getAllBooks() {
		return allBooks;
	}

	public void setAllBooks(ArrayList<LibraryBookDetailsVo> allBooks) {
		this.allBooks = allBooks;
	}

}
